#ifndef _WINDOW_HANDLER_SDL_H_
#define _WINDOW_HANDLER_SDL_H_

#include "ui/ui_widget.h"
#include "window_handler.h"
#ifdef _PLATFORM_SDL


#ifdef _SDL2
    #include "SDL2/include/SDL.h"
#else
    #include "SDL-1.2.13/include/SDL.h"
#endif




class	WindowHandlerSDL : public WindowHandler
{
public:
	
	
							WindowHandlerSDL();
	virtual					~WindowHandlerSDL();
// all windows need to handle the following events.
	virtual bool			InitWindow(const std::string& Name, const std::string& Title, int	X, int Y, int Width, int Height);
	virtual bool			InitGraphics();
	virtual bool			DestroyWindow();
	virtual bool			Tick(float dt);
	virtual void			ResetDevice();

	virtual bool			OnGainFocus();
	virtual bool			OnLooseFocus();
// do whatever the system needs to update it's message pump
	virtual bool			UpdateOS();


// not applicable to all, but for most

	virtual bool			Minimize();
	virtual bool			Maximize();
	virtual void			SwitchFullscreen(int Width, int Height);
	virtual void			SwitchWindowed(int Width, int Height);

	virtual std::string		GetSaveFolder();
	virtual bool			SetCursor(const std::string& File);

// functions to change screen resolution around
	virtual bool			GetCurrentResolution(unsigned int& Width, unsigned int& Height, unsigned int &Depth);
	virtual bool			SetResolution(unsigned int Width, unsigned int Height, unsigned int Depth);
	virtual bool			RestoreResolution();
	virtual bool			DetectWidescreenMode();



protected:
	
	void					ToggleFullscreen();

	void DELEGATE_CALL		OnHardQuit(ui::UIWidget::WIDGET_EVENT Event, ui::UIWidget* pWidget);
	
	std::string			    m_CurrentCursorName;
	bool					m_ShowCustomMouse;

	void*					*m_CustomCursor;
    
   
};
#endif  //_PLATFORM_SDK

#endif